<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>链表</title>
  </head>
  <body>
    <script>
      // js中的链表，是以嵌套的对象的形式来实现的
      // 链表的特点是允许元素散落在内存空间的各个角落
      let chainList = {
        //数据域
        val: 1,
        //指针域
        next: {
          val: 2,
          next: {},
        },
      }
      console.log(chainList.next)
    </script>
  </body>
</html>
